home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
catn
/
seek.n
< prev
next >
Wrap
Text File
|
1994-09-20
|
2KB
|
67 lines
seek(n) Tcl Built-In Commands
_________________________________________________________________
NAME
seek - Change the access position for an open file
SYNOPSIS
seek _f_i_l_e_I_d _o_f_f_s_e_t ?_o_r_i_g_i_n?
_________________________________________________________________
DESCRIPTION
Change the current access position for _f_i_l_e_I_d. _F_i_l_e_I_d must
have been the return value from a previous call to open, or
it may be stdin, stdout, or stderr to refer to one of the
standard I/O channels. The _o_f_f_s_e_t and _o_r_i_g_i_n arguments
specify the position at which the next read or write will
occur for _f_i_l_e_I_d. _O_f_f_s_e_t must be an integer (which may be
negative) and _o_r_i_g_i_n must be one of the following:
start
The new access position will be _o_f_f_s_e_t bytes from the
start of the file.
current
The new access position will be _o_f_f_s_e_t bytes from the
current access position; a negative _o_f_f_s_e_t moves the
access position backwards in the file.
end The new access position will be _o_f_f_s_e_t bytes from the
end of the file. A negative _o_f_f_s_e_t places the access
position before the end-of-file, and a positive _o_f_f_s_e_t
places the access position after the end-of-file.
The _o_r_i_g_i_n argument defaults to start. This command returns
an empty string.
KEYWORDS
access position, file, seek
Tcl 1